/********************************************************/
/*	Copyright (C) 2016 Gong Li Bin			*/
/*	Project:	MapReduce			*/
/*	Author:		gong_libin			*/
/*	Date:		2016_06_01			*/
/*	File:		MrUtils.h			*/
/********************************************************/

#ifndef	_MRUTILS_H
#define	_MRUTILS_H 

#include "MrJob.h"

#define	MR_UT_SLEEP			60

void MrJbQuit(int iSignal);
void MrJbResponse(char* pszUrl);
void* MrJbAdminCore(void* pNULL);
void MrJbDevDisplay(UINT* puiDev);
void MrJbHelp(char* pszProc, char* pszVer);
void MrJbResponse(struct sockaddr_in* pstAddr);
void MrJbDevInput(UINT* puiHost, CMrSet& CHost);
int MrJbCompPoll(const void* pDev1, const void* pDev2);
int MrJbCompHost(const void* pDev1, const void* pDev2);
void MrJbDevReqAry(MRJBPACKET_S* pstPacket, UINT* puiDev);
void MrJbDevReqSet(MRJBPACKET_S* pstPacket, CMrSet& rCDev);
UCHAR MrJbDevSort(CMrUdp& rCSend, MRJBPACKET_S* pstPacket, UINT* puiHost);
int MrJbPortInit(CMrDb& rCDb, char* pszSql, MRCONFIG_S* pstConf, char* pszPort);
int MrJbDevInit(CMrDb& rCDb, char* pszSql, MRCONFIG_S* pstConf, CMrSet* pCSet, UCHAR ucType);

#endif /* _MRUTILS_H */
